/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view.alternativesrating;

import data.ACStorage;
import javax.swing.table.AbstractTableModel;
import model.Criteria;

/**
 *
 * @author student1
 */
public class TblModelNormalizedAlternatives extends AbstractTableModel{
    Criteria criteria;

    public TblModelNormalizedAlternatives() {
    }

    public TblModelNormalizedAlternatives(Criteria criteria) {
        this.criteria = criteria;
    }
    
    @Override
    public int getRowCount() {
        return ACStorage.getInstance().getAlternatives().size();
    }

    @Override
    public int getColumnCount() {
        return  ACStorage.getInstance().getAlternatives().size() + 1;
    }

    @Override
    public Object getValueAt(int rowIndex, int columnIndex) {
        return null;
        
    }
    public boolean isCellEditable(int rowIndex, int columnIndex) {
       return false;
    }
    
    public String getColumnName(int column) {
        if (column == 0) {
            return "";
        } else {
            return ACStorage.getInstance().getAlternatives().get(column - 1).getName();
        }
    }
    
    
    
}
